Ov via
In [1]:
Copied!
import Pyomic
import scanpy as sc
import matplotlib.pyplot as plt
Pyomic.utils.pyomic_plot_set()
import Pyomic
import scanpy as sc
import matplotlib.pyplot as plt
Pyomic.utils.pyomic_plot_set()
/Users/julia/miniforge3/envs/nocd/lib/python3.8/site-packages/phate/__init__.py
In [2]:
Copied!
import anndata
adatacrc=anndata.read_h5ad('/Users/julia/USTB/Pyomic/crc_data.h5ad')
adatacrc
import anndata
adatacrc=anndata.read_h5ad('/Users/julia/USTB/Pyomic/crc_data.h5ad')
adatacrc
Out[2]:
AnnData object with n_obs × n_vars = 132726 × 1458
obs: 'n_genes', 'doublet_score', 'predicted_doublet', 'n_genes_by_counts', 'total_counts', 'total_counts_mt', 'pct_counts_mt', 'leiden', 'scsa_celltype', 'major_celltype', 'scsa_true_celltype'
var: 'gene_ids', 'n_cells', 'mt', 'n_cells_by_counts', 'mean_counts', 'pct_dropout_by_counts', 'total_counts', 'highly_variable', 'means', 'dispersions', 'dispersions_norm', 'mean', 'std'
uns: 'dendrogram_leiden', 'hvg', 'leiden', 'leiden_colors', 'leiden_sizes', 'log1p', 'major_celltype_colors', 'neighbors', 'paga', 'pca', 'rank_genes_groups', 'scrublet', 'scsa_celltype_colors', 'umap'
obsm: 'X_pca', 'X_umap'
varm: 'PCs'
layers: 'counts'
obsp: 'connectivities', 'distances'
In [3]:
Copied!
adata_can=adatacrc[adatacrc.obs['scsa_true_celltype'].isin(["Epithelial cell","Cancer stem cell"])]
adata_can=adatacrc[adatacrc.obs['scsa_true_celltype'].isin(["Epithelial cell","Cancer stem cell"])]
In [4]:
Copied!
adata_can
adata_can
Out[4]:
View of AnnData object with n_obs × n_vars = 11410 × 1458
obs: 'n_genes', 'doublet_score', 'predicted_doublet', 'n_genes_by_counts', 'total_counts', 'total_counts_mt', 'pct_counts_mt', 'leiden', 'scsa_celltype', 'major_celltype', 'scsa_true_celltype'
var: 'gene_ids', 'n_cells', 'mt', 'n_cells_by_counts', 'mean_counts', 'pct_dropout_by_counts', 'total_counts', 'highly_variable', 'means', 'dispersions', 'dispersions_norm', 'mean', 'std'
uns: 'dendrogram_leiden', 'hvg', 'leiden', 'leiden_colors', 'leiden_sizes', 'log1p', 'major_celltype_colors', 'neighbors', 'paga', 'pca', 'rank_genes_groups', 'scrublet', 'scsa_celltype_colors', 'umap'
obsm: 'X_pca', 'X_umap'
varm: 'PCs'
layers: 'counts'
obsp: 'connectivities', 'distances'
In [7]:
Copied!
adata_can.uns['log1p']['base']=None
adata_can.uns['log1p']['base']=None
In [8]:
Copied!
sc.tl.pca(adata_can, n_comps=100, svd_solver="auto")
sc.pp.neighbors(adata_can, metric="cosine")
sc.tl.leiden(adata_can)
sc.tl.paga(adata_can)
sc.pl.paga(adata_can, plot=False) # remove `plot=False` if you want to see the coarse-grained graph
sc.tl.umap(adata_can,init_pos='paga')
sc.tl.dendrogram(adata_can,'leiden')
sc.tl.rank_genes_groups(adata_can, 'leiden', method='wilcoxon')
sc.tl.pca(adata_can, n_comps=100, svd_solver="auto")
sc.pp.neighbors(adata_can, metric="cosine")
sc.tl.leiden(adata_can)
sc.tl.paga(adata_can)
sc.pl.paga(adata_can, plot=False) # remove `plot=False` if you want to see the coarse-grained graph
sc.tl.umap(adata_can,init_pos='paga')
sc.tl.dendrogram(adata_can,'leiden')
sc.tl.rank_genes_groups(adata_can, 'leiden', method='wilcoxon')
computing PCA
Note that scikit-learn's randomized PCA might not be exactly reproducible across different computational platforms. For exact reproducibility, choose `svd_solver='arpack'.`
on highly variable genes
with n_comps=100
finished (0:00:05)
computing neighbors
using 'X_pca' with n_pcs = 100
finished: added to `.uns['neighbors']`
`.obsp['distances']`, distances for each pair of neighbors
`.obsp['connectivities']`, weighted adjacency matrix (0:00:00)
running Leiden clustering
finished: found 12 clusters and added
'leiden', the cluster labels (adata.obs, categorical) (0:00:00)
running PAGA
finished: added
'paga/connectivities', connectivities adjacency (adata.uns)
'paga/connectivities_tree', connectivities subtree (adata.uns) (0:00:00)
--> added 'pos', the PAGA positions (adata.uns['paga'])
computing UMAP
finished: added
'X_umap', UMAP coordinates (adata.obsm) (0:00:04)
using 'X_pca' with n_pcs = 100
Storing dendrogram info using `.uns['dendrogram_leiden']`
ranking genes
finished: added to `.uns['rank_genes_groups']`
'names', sorted np.recarray to be indexed by group ids
'scores', sorted np.recarray to be indexed by group ids
'logfoldchanges', sorted np.recarray to be indexed by group ids
'pvals', sorted np.recarray to be indexed by group ids
'pvals_adj', sorted np.recarray to be indexed by group ids (0:00:14)
In [65]:
Copied!
sc.tl.leiden(adata_can)
sc.tl.leiden(adata_can)
running Leiden clustering
finished: found 17 clusters and added
'leiden', the cluster labels (adata.obs, categorical) (0:00:00)
In [71]:
Copied!
results_file = 'crc-via.h5ad'
adata_can.write(results_file)
results_file = 'crc-via.h5ad'
adata_can.write(results_file)
In [88]:
Copied!
crc=anndata.read_h5ad('/Users/julia/USTB/Pyomic/crc-via.h5ad')
crc
crc=anndata.read_h5ad('/Users/julia/USTB/Pyomic/crc-via.h5ad')
crc
Out[88]:
AnnData object with n_obs × n_vars = 11410 × 1458
obs: 'n_genes', 'doublet_score', 'predicted_doublet', 'n_genes_by_counts', 'total_counts', 'total_counts_mt', 'pct_counts_mt', 'leiden', 'scsa_celltype', 'major_celltype', 'scsa_true_celltype'
var: 'gene_ids', 'n_cells', 'mt', 'n_cells_by_counts', 'mean_counts', 'pct_dropout_by_counts', 'total_counts', 'highly_variable', 'means', 'dispersions', 'dispersions_norm', 'mean', 'std'
uns: 'dendrogram_leiden', 'hvg', 'leiden', 'leiden_colors', 'leiden_sizes', 'log1p', 'major_celltype_colors', 'neighbors', 'paga', 'pca', 'rank_genes_groups', 'scrublet', 'scsa_celltype_colors', 'umap'
obsm: 'X_pca', 'X_umap'
varm: 'PCs'
layers: 'counts'
obsp: 'connectivities', 'distances'
In [10]:
Copied!
via=ov.single.pySCSA(adata=adata_can,
foldchange=1.5,
pvalue=0.01,
celltype='cancer',
target='cancersea',
tissue='All',
)
via=ov.single.pySCSA(adata=adata_can,
foldchange=1.5,
pvalue=0.01,
celltype='cancer',
target='cancersea',
tissue='All',
)
......Loading dataset from temp/pySCSA_2023.db
In [20]:
Copied!
celltype=via.cell_anno(clustertype='leiden',
cluster='all')
celltype=via.cell_anno(clustertype='leiden',
cluster='all')
...Auto annotate cell Version V2.0 [2023/04/07] DB load: GO_items:47347,Human_GO:3,Mouse_GO:3, CellMarkers:96074,CancerSEA:1574, Ensembl_HGNC:61541,Ensembl_Mouse:55414 Namespace(Gensymbol=True, MarkerDB=None, celltype='cancer', cluster='all', db='temp/pySCSA_2023.db', fc='/Users/julia/Library/Jupyter/runtime/kernel-2d3bd063-8833-49d0-8da7-6b51af609ab0.json', foldchange=1.5, input='temp/rna.csv', list_tissue=False, noprint=True, norefdb=False, outfmt='txt', output='temp/rna_anno.txt', pvalue=0.01, source='scanpy', species='Human', target='cancersea', tissue='All', weight=100.0) Version V2.0 [2023/04/07] DB load: GO_items:47347,Human_GO:3,Mouse_GO:3, CellMarkers:96074,CancerSEA:1574, Ensembl_HGNC:61541,Ensembl_Mouse:55414 load markers: 15107 Cluster 0 Gene number: 285 Other Gene number: 278 Cluster 1 Gene number: 302 Other Gene number: 341 Cluster 10 Gene number: 140 Other Gene number: 352 Cluster 11 Gene number: 534 Other Gene number: 283 Cluster 2 Gene number: 142 Other Gene number: 348 Cluster 3 Gene number: 37 Other Gene number: 354 Cluster 4 Gene number: 661 Other Gene number: 304 Cluster 5 Gene number: 726 Other Gene number: 314 Cluster 6 Gene number: 5 Other Gene number: 355 Cluster 7 Gene number: 223 Other Gene number: 350 Cluster 8 Gene number: 33 Other Gene number: 354 Cluster 9 Gene number: 121 Other Gene number: 346 #Cluster Type Celltype Score Times ['0', 'Good', 'Cell Cycle', 3.1989596988250297, 5.682649995805121] ['1', '?', 'Stemness|Metastasis', '2.3501004808766175|1.3793679197811215', 1.7037517309011596] ['10', 'Good', 'Stemness', 1.9273475186998819, 2.8234665824099414] ['11', 'Good', 'Inflammation', 2.5892856029578164, 2.885867087495365] ['2', '?', 'Metastasis|Inflammation', '2.3466657722828628|1.2936049527938518', 1.814051320083981] ['3', 'Good', 'Quiescence', 0.88811721238297, 4.553717142357703] ['4', 'Good', 'Stemness', 2.6002435346029245, 2.7377423449871325] ['5', '?', 'Differentiation|Stemness', '1.8031309962151147|1.1478053437390159', 1.5709379696224037] ['6', '?', 'Differentiation|Invasion', '0.86602540378444|0.86602540378444', 1.0] ['7', '?', 'Differentiation|Stemness', '1.6904225570920328|1.3109028002950007', 1.2895102189968823] ['8', 'Good', 'EMT', 0.9294545894414035, '-'] ['9', '?', 'Stemness|Metastasis', '1.765952157667386|1.4327727152412502', 1.232541727576125]
In [16]:
Copied!
via.cell_auto_anno(adata_can)
via.cell_auto_anno(adata_can)
...cell type added to scsa_celltype on obs of anndata
In [66]:
Copied!
cluster2annotation = {
'0': 'Cell Cycle',
'1': 'Metastasis',
'2': 'Metastasis',
'3': 'Quiescence',
'4': 'Stemness',
'5': 'Differentiation',
'6': 'Invasion',
'7': 'Stemness',
'8': 'EMT',
'9': 'Metastasis',
'10': 'Stemness',
'11': 'Inflammation'
}
cluster2annotation = {
'0': 'Cell Cycle',
'1': 'Metastasis',
'2': 'Metastasis',
'3': 'Quiescence',
'4': 'Stemness',
'5': 'Differentiation',
'6': 'Invasion',
'7': 'Stemness',
'8': 'EMT',
'9': 'Metastasis',
'10': 'Stemness',
'11': 'Inflammation'
}
In [67]:
Copied!
ov.single.scanpy_cellanno_from_dict(adata_can,anno_dict=cluster2annotation,
clustertype='leiden')
ov.single.scanpy_cellanno_from_dict(adata_can,anno_dict=cluster2annotation,
clustertype='leiden')
...cell type added to major_celltype on obs of anndata
In [73]:
Copied!
v0 = ov.single.pyVIA(adata=adata_can,adata_key='X_pca',adata_ncomps=80, basis='X_umap',
clusters='major_celltype',knn=30,random_seed=4,root_user=['Stemness'],dataset='group')
v0.run()
v0 = ov.single.pyVIA(adata=adata_can,adata_key='X_pca',adata_ncomps=80, basis='X_umap',
clusters='major_celltype',knn=30,random_seed=4,root_user=['Stemness'],dataset='group')
v0.run()
2023-05-09 00:56:30.013333 Running VIA over input data of 11410 (samples) x 80 (features)
2023-05-09 00:56:30.013729 Knngraph has 30 neighbors
2023-05-09 00:56:33.044337 Finished global pruning of 30-knn graph used for clustering at level of 0.15. Kept 44.3 % of edges.
2023-05-09 00:56:33.078763 Number of connected components used for clustergraph is 1
2023-05-09 00:56:33.545202 Commencing community detection
2023-05-09 00:56:33.712832 Finished running Leiden algorithm. Found 104 clusters.
2023-05-09 00:56:33.715016 Merging 83 very small clusters (<10)
2023-05-09 00:56:33.717135 Finished detecting communities. Found 21 communities
2023-05-09 00:56:33.717617 Making cluster graph. Global cluster graph pruning level: 0.15
2023-05-09 00:56:33.754116 Graph has 1 connected components before pruning
2023-05-09 00:56:33.755414 Graph has 1 connected components after pruning
2023-05-09 00:56:33.755507 Graph has 1 connected components after reconnecting
2023-05-09 00:56:33.755814 0.0% links trimmed from local pruning relative to start
2023-05-09 00:56:33.755829 71.1% links trimmed from global pruning relative to start
2023-05-09 00:56:33.757847 Starting make edgebundle viagraph...
2023-05-09 00:56:33.757932 Make via clustergraph edgebundle
2023-05-09 00:56:33.885249 Hammer dims: Nodes shape: (21, 2) Edges shape: (96, 3)
2023-05-09 00:56:33.886585 component number 0 out of [0]
group root method
for component 0, the root is Stemness and ri Stemness
2023-05-09 00:56:33.930443 New root is 4 and majority Stemness
2023-05-09 00:56:33.932723 New root is 10 and majority Stemness
2023-05-09 00:56:33.933037 New root is 11 and majority Stemness
2023-05-09 00:56:33.935601 Computing lazy-teleporting expected hitting times
/Users/julia/miniforge3/envs/nocd/lib/python3.8/site-packages/phate/__init__.py
/Users/julia/miniforge3/envs/nocd/lib/python3.8/site-packages/phate/__init__.py
/Users/julia/miniforge3/envs/nocd/lib/python3.8/site-packages/phate/__init__.py
/Users/julia/miniforge3/envs/nocd/lib/python3.8/site-packages/phate/__init__.py
/Users/julia/miniforge3/envs/nocd/lib/python3.8/site-packages/phate/__init__.py
2023-05-09 00:56:43.313777 Identifying terminal clusters corresponding to unique lineages...
2023-05-09 00:56:43.313947 Closeness:[5, 6, 8, 9, 15, 16]
2023-05-09 00:56:43.313964 Betweenness:[2, 3, 5, 6, 8, 9, 11, 12, 15, 16, 17, 19]
2023-05-09 00:56:43.313977 Out Degree:[0, 2, 5, 7, 8, 9, 13, 15, 16, 18]
2023-05-09 00:56:43.314466 Terminal clusters corresponding to unique lineages in this component are [2, 5, 6, 8, 9, 15, 16]
/Users/julia/miniforge3/envs/nocd/lib/python3.8/site-packages/phate/__init__.py
/Users/julia/miniforge3/envs/nocd/lib/python3.8/site-packages/phate/__init__.py
/Users/julia/miniforge3/envs/nocd/lib/python3.8/site-packages/phate/__init__.py
/Users/julia/miniforge3/envs/nocd/lib/python3.8/site-packages/phate/__init__.py
/Users/julia/miniforge3/envs/nocd/lib/python3.8/site-packages/phate/__init__.py
2023-05-09 00:56:50.603392 From root 11, the Terminal state 2 is reached 256 times.
/Users/julia/miniforge3/envs/nocd/lib/python3.8/site-packages/phate/__init__.py
/Users/julia/miniforge3/envs/nocd/lib/python3.8/site-packages/phate/__init__.py
/Users/julia/miniforge3/envs/nocd/lib/python3.8/site-packages/phate/__init__.py
/Users/julia/miniforge3/envs/nocd/lib/python3.8/site-packages/phate/__init__.py
/Users/julia/miniforge3/envs/nocd/lib/python3.8/site-packages/phate/__init__.py
2023-05-09 00:56:57.858536 From root 11, the Terminal state 5 is reached 148 times.
/Users/julia/miniforge3/envs/nocd/lib/python3.8/site-packages/phate/__init__.py
/Users/julia/miniforge3/envs/nocd/lib/python3.8/site-packages/phate/__init__.py
/Users/julia/miniforge3/envs/nocd/lib/python3.8/site-packages/phate/__init__.py
/Users/julia/miniforge3/envs/nocd/lib/python3.8/site-packages/phate/__init__.py
/Users/julia/miniforge3/envs/nocd/lib/python3.8/site-packages/phate/__init__.py
2023-05-09 00:57:05.318414 From root 11, the Terminal state 6 is reached 106 times.
/Users/julia/miniforge3/envs/nocd/lib/python3.8/site-packages/phate/__init__.py
/Users/julia/miniforge3/envs/nocd/lib/python3.8/site-packages/phate/__init__.py
/Users/julia/miniforge3/envs/nocd/lib/python3.8/site-packages/phate/__init__.py
/Users/julia/miniforge3/envs/nocd/lib/python3.8/site-packages/phate/__init__.py
/Users/julia/miniforge3/envs/nocd/lib/python3.8/site-packages/phate/__init__.py
2023-05-09 00:57:12.219564 From root 11, the Terminal state 8 is reached 172 times.
/Users/julia/miniforge3/envs/nocd/lib/python3.8/site-packages/phate/__init__.py
/Users/julia/miniforge3/envs/nocd/lib/python3.8/site-packages/phate/__init__.py
/Users/julia/miniforge3/envs/nocd/lib/python3.8/site-packages/phate/__init__.py
/Users/julia/miniforge3/envs/nocd/lib/python3.8/site-packages/phate/__init__.py
/Users/julia/miniforge3/envs/nocd/lib/python3.8/site-packages/phate/__init__.py
2023-05-09 00:57:18.823341 From root 11, the Terminal state 9 is reached 520 times.
/Users/julia/miniforge3/envs/nocd/lib/python3.8/site-packages/phate/__init__.py
/Users/julia/miniforge3/envs/nocd/lib/python3.8/site-packages/phate/__init__.py
/Users/julia/miniforge3/envs/nocd/lib/python3.8/site-packages/phate/__init__.py
/Users/julia/miniforge3/envs/nocd/lib/python3.8/site-packages/phate/__init__.py
/Users/julia/miniforge3/envs/nocd/lib/python3.8/site-packages/phate/__init__.py
2023-05-09 00:57:25.724255 From root 11, the Terminal state 15 is reached 150 times.
/Users/julia/miniforge3/envs/nocd/lib/python3.8/site-packages/phate/__init__.py
/Users/julia/miniforge3/envs/nocd/lib/python3.8/site-packages/phate/__init__.py
/Users/julia/miniforge3/envs/nocd/lib/python3.8/site-packages/phate/__init__.py
/Users/julia/miniforge3/envs/nocd/lib/python3.8/site-packages/phate/__init__.py
/Users/julia/miniforge3/envs/nocd/lib/python3.8/site-packages/phate/__init__.py
2023-05-09 00:57:32.314292 From root 11, the Terminal state 16 is reached 20 times.
2023-05-09 00:57:32.328999 Terminal clusters corresponding to unique lineages are {2: 'Invasion', 5: 'Differentiation', 6: 'Metastasis', 8: 'Cell Cycle', 9: 'Metastasis', 15: 'Differentiation', 16: 'Metastasis'}
2023-05-09 00:57:32.329072 Begin projection of pseudotime and lineage likelihood
2023-05-09 00:57:32.801354 Graph has 1 connected components before pruning
2023-05-09 00:57:32.802766 Graph has 6 connected components after pruning
2023-05-09 00:57:32.805356 Graph has 1 connected components after reconnecting
2023-05-09 00:57:32.805643 57.3% links trimmed from local pruning relative to start
2023-05-09 00:57:32.805662 70.8% links trimmed from global pruning relative to start
2023-05-09 00:57:32.807895 Start making edgebundle milestone...
2023-05-09 00:57:32.807954 Start finding milestones
2023-05-09 00:57:34.583033 End milestones
2023-05-09 00:57:34.583115 Will use via-pseudotime for edges, otherwise consider providing a list of numeric labels (single cell level) or via_object
2023-05-09 00:57:34.629572 Recompute weights
2023-05-09 00:57:34.656012 pruning milestone graph based on recomputed weights
2023-05-09 00:57:34.657344 Graph has 1 connected components before pruning
2023-05-09 00:57:34.658151 Graph has 1 connected components after pruning
2023-05-09 00:57:34.658355 Graph has 1 connected components after reconnecting
2023-05-09 00:57:34.659162 78.0% links trimmed from global pruning relative to start
2023-05-09 00:57:34.659232 regenerate igraph on pruned edges
2023-05-09 00:57:34.666344 Setting numeric label as single cell pseudotime for coloring edges
2023-05-09 00:57:34.687339 Making smooth edges
2023-05-09 00:57:39.519567 Time elapsed 68.0 seconds
In [76]:
Copied!
fig, ax = plt.subplots(1,1,figsize=(4,4))
sc.pl.embedding(
adata_can,
basis="X_umap",
color=['major_celltype'],
frameon=False,
ncols=1,
wspace=0.5,
show=False,
ax=ax
)
fig.savefig('via_fig1.png',dpi=300,bbox_inches = 'tight')
fig, ax = plt.subplots(1,1,figsize=(4,4))
sc.pl.embedding(
adata_can,
basis="X_umap",
color=['major_celltype'],
frameon=False,
ncols=1,
wspace=0.5,
show=False,
ax=ax
)
fig.savefig('via_fig1.png',dpi=300,bbox_inches = 'tight')
In [77]:
Copied!
fig, ax, ax1 = v0.plot_piechart_graph(clusters='major_celltype',cmap='Reds',dpi=80,
show_legend=False,ax_text=False,fontsize=4)
fig.savefig('via_fig2.png',dpi=300,bbox_inches = 'tight')
fig, ax, ax1 = v0.plot_piechart_graph(clusters='major_celltype',cmap='Reds',dpi=80,
show_legend=False,ax_text=False,fontsize=4)
fig.savefig('via_fig2.png',dpi=300,bbox_inches = 'tight')
In [78]:
Copied!
v0.get_pseudotime(v0.adata)
v0.adata
v0.get_pseudotime(v0.adata)
v0.adata
...the pseudotime of VIA added to AnnData obs named `pt_via`
Out[78]:
AnnData object with n_obs × n_vars = 11410 × 1458
obs: 'n_genes', 'doublet_score', 'predicted_doublet', 'n_genes_by_counts', 'total_counts', 'total_counts_mt', 'pct_counts_mt', 'leiden', 'scsa_celltype', 'major_celltype', 'scsa_true_celltype', 'pt_via'
var: 'gene_ids', 'n_cells', 'mt', 'n_cells_by_counts', 'mean_counts', 'pct_dropout_by_counts', 'total_counts', 'highly_variable', 'means', 'dispersions', 'dispersions_norm', 'mean', 'std'
uns: 'dendrogram_leiden', 'hvg', 'leiden', 'leiden_colors', 'leiden_sizes', 'log1p', 'major_celltype_colors', 'neighbors', 'paga', 'pca', 'rank_genes_groups', 'scrublet', 'scsa_celltype_colors', 'umap'
obsm: 'X_pca', 'X_umap'
varm: 'PCs'
layers: 'counts'
obsp: 'connectivities', 'distances'
In [86]:
Copied!
fig,ax1,ax2=v0.plot_trajectory_gams(basis='X_umap',clusters='major_celltype',draw_all_curves=False)
fig.savefig('via_fig3.png',dpi=300,bbox_inches = 'tight')
fig,ax1,ax2=v0.plot_trajectory_gams(basis='X_umap',clusters='major_celltype',draw_all_curves=False)
fig.savefig('via_fig3.png',dpi=300,bbox_inches = 'tight')
100% (11 of 11) |########################| Elapsed Time: 0:00:00 Time: 0:00:00 100% (11 of 11) |########################| Elapsed Time: 0:00:00 Time: 0:00:00 100% (11 of 11) |########################| Elapsed Time: 0:00:00 Time: 0:00:00 100% (11 of 11) |########################| Elapsed Time: 0:00:00 Time: 0:00:00 100% (11 of 11) |########################| Elapsed Time: 0:00:00 Time: 0:00:00 100% (11 of 11) |########################| Elapsed Time: 0:00:00 Time: 0:00:00 100% (11 of 11) |########################| Elapsed Time: 0:00:00 Time: 0:00:00 100% (11 of 11) |########################| Elapsed Time: 0:00:00 Time: 0:00:00 100% (11 of 11) |########################| Elapsed Time: 0:00:00 Time: 0:00:00 100% (11 of 11) |########################| Elapsed Time: 0:00:00 Time: 0:00:00 100% (11 of 11) |########################| Elapsed Time: 0:00:00 Time: 0:00:00 100% (11 of 11) |########################| Elapsed Time: 0:00:00 Time: 0:00:00
2023-05-09 01:11:23.830520 Super cluster 2 is a super terminal with sub_terminal cluster 2 2023-05-09 01:11:23.880765 Super cluster 5 is a super terminal with sub_terminal cluster 5 2023-05-09 01:11:23.880868 Super cluster 6 is a super terminal with sub_terminal cluster 6 2023-05-09 01:11:23.880909 Super cluster 8 is a super terminal with sub_terminal cluster 8 2023-05-09 01:11:23.880951 Super cluster 9 is a super terminal with sub_terminal cluster 9 2023-05-09 01:11:23.881002 Super cluster 15 is a super terminal with sub_terminal cluster 15 2023-05-09 01:11:23.881046 Super cluster 16 is a super terminal with sub_terminal cluster 16
In [87]:
Copied!
fig,ax=v0.plot_stream(basis='X_umap',clusters='major_celltype',
density_grid=0.8, scatter_size=30, scatter_alpha=0.3, linewidth=0.5)
fig.savefig('via_fig4.png',dpi=300,bbox_inches = 'tight')
fig,ax=v0.plot_stream(basis='X_umap',clusters='major_celltype',
density_grid=0.8, scatter_size=30, scatter_alpha=0.3, linewidth=0.5)
fig.savefig('via_fig4.png',dpi=300,bbox_inches = 'tight')
In [ ]:
Copied!